<!DOCTYPE html>
<html {% if language is not none %} lang="{{ language }}"{% endif %}>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        {{ metatags }}
        {%- block htmltitle %}<title>{{ title|striptags|e }}{{ titlesuffix }}</title>{%- endblock %}
        {%- if favicon %}<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>{%- endif %}
        <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/idea.min.css">      
        <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
        <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.12/css/perfect-scrollbar.min.css" type="text/css" />
        {%- for cssfile in css_files %}
            <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
        {%- endfor %}
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.0.0/turbolinks.min.js"></script>
        <script type="text/javascript">
          Turbolinks.start();
        </script>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <script type="text/javascript" src="_static/materialize.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.12/js/perfect-scrollbar.jquery.min.js"></script>

        <meta name="yandex_metrika:counter_id" content="42885449">
        <meta name="yandex_metrika:options" content='{"clickmap":true,"trackLinks":true,"accurateTrackBounce":true,"webvisor":true}'>
        <script src="https://mc.yandex.ru/metrika/watch.js" type="text/javascript"></script>
        <script src="_static/yandex-metrika-initializer.js" type="text/javascript"></script>
    </head>
    <body>
        <header>
            <ul id="slide-out" class="side-nav fixed">
                <li>
                    <div class="userView center-align ">
                        <a href="http://viewflow.io"><img class="logo" src="_static/logo.png" alt="Logo"/></a>
                    </div>
                </li>

                {%- block sidebarlogo %}{%- if logo %}
                <li>
                    <div class="userView center-align ">
                        <a href="http://viewflow.io"><img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/></a>
                    </div>
                </li>
                {%- endif %}{%- endblock %}
                {%- block sidebartoc %}
                    {%- include "localtoc.html" %}
                {%- endblock %}
            </ul>
        </header>
        <div style="z-index:-1;background-color:#424242;height:109px;width:100%;position:absolute;top:0">&nbsp;</div>        
        <main>
            <a href="#" data-activates="slide-out" class="button-collapse hide-on-large-only" style="color:white;font-size:4rem;position:absolute"><i class="material-icons" style="font-size: 4rem;padding-top:25px;">menu</i></a>
            {%- block document %}
            <div class="document container">
                <div class="row">
                    <div class="col s12 m10 l9">
                        {% block body %} {% endblock %}
                    </div>
                    <div class="col s12 m2 l3" style="margin-top: 149px;padding-left:60px">
                        <div id="pin" class="hide-on-small-only"> </div>
                    </div>
                </div>
            </div>
            {%- endblock document %}
        </main>
        <footer class="page-footer grey darken-1">
            <div class="container">
                <div class="row">
                    <div class="col l4 s12">
                        <h5 class="white-text">Django Viewflow</h5><p class="grey-text text-lighten-4">Reusable workflow library for business process automation with python and BPMN</p>
                        <a target="_blank" href="https://github.com/viewflow/"><i class="zmdi zmdi-github zmdi-hc-2x white-text"></i></a>&nbsp;&nbsp;&nbsp;
                        <a target="_blank" href="https://twitter.com/viewflow"><i class="zmdi zmdi-twitter zmdi-hc-2x white-text"></i></a>
                    </div>
                    <div class="col l4 offset-l4 s13">
                        <div id="mc_embed_signup">
                            <form action="https://viewflow.us8.list-manage.com/subscribe/post?u=840815b5d579f45277f0764f0&amp;id=d267f3adcb" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="novalidate">
                                <div id="mc_embed_signup_scroll">
	                                <h5 class="white-text">Subscribe to our mailing list</h5>
                                    <div class="mc-field-group input-field">
	                                    <label for="mce-EMAIL" class="white-text">Email Address </label>
	                                    <input type="email" class="white-text" value="" name="EMAIL" id="mce-EMAIL">
                                    </div>
	                                <div id="mce-responses" class="clear">
		                                <div class="response white-text" id="mce-error-response" style="display:none"></div>
		                                <div class="response  white-text" id="mce-success-response" style="display:none"></div>
	                                </div>
                                    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
                                    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_840815b5d579f45277f0764f0_d267f3adcb" tabindex="-1" value=""></div>
                                    <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button btn white black-text ">
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </footer>        
        <script type="text/javascript">
          $(".button-collapse").sideNav();
          $('#slide-out').perfectScrollbar();
          $('#pin').pushpin({top: 149, offset: 40});

          var classListLinks = "";

          $('dl.class>dt').each(function() {
            var classID = $(this).attr('id');
            var className = classID.split('.').pop();
            classListLinks += '<li><a href="#' + classID + '">' + className + '</a></li>';
          });

          if(classListLinks) {
            $('#pin span').remove();
            $('#pin ul').remove();
            $('#pin').append(
              '<span style="padding-left:10px">API</span>' + 
              '<ul class="section table-of-contents" style="margin-top:0px;">' +
              classListLinks +
              ' </ul>'
            );
          }          
        </script>
    </body>
</html>
